package com.deyuanyun.pic.settings.support.sitemesh;

import org.sitemesh.SiteMeshContext;
import org.sitemesh.content.ContentProperty;
import org.sitemesh.content.tagrules.TagRuleBundle;
import org.sitemesh.content.tagrules.html.ExportTagToContentRule;
import org.sitemesh.tagprocessor.State;

/**
 * Created with IntelliJ IDEA.
 * User: linwei
 * Date: 15-8-6
 * Time: 上午9:29
 * To change this template use File | Settings | File Templates.
 */
public class MyTagRuleBundle implements TagRuleBundle {
    @Override
    public void install(State state, ContentProperty contentProperty, SiteMeshContext siteMeshContext) {
        state.addRule("myHeader", new ExportTagToContentRule(siteMeshContext, contentProperty.getChild("myHeader"), false));
    }

    @Override
    public void cleanUp(State state, ContentProperty contentProperty, SiteMeshContext siteMeshContext) {
        //To change body of implemented methods use File | Settings | File Templates.
    }
}
